package com.tingfeng.food.door;

import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;

import com.example.food_door.R;

public class MainActivity extends Activity {

    private WebView webView;
    private String homePage = "https://gitee.com/huitoukest_009/food-record/raw/master/app/home.html";
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        webView = findViewById(R.id.mainWebView);
        webView.getSettings().setSupportZoom(true);
        webView.getSettings().setJavaScriptEnabled(true); // 可选
        webView.setWebViewClient(new CustomWebViewClient());
        // 加载网页
        webView.loadUrl(homePage);
    }
}